# with open('D:/Test.txt', 'r', encoding = 'utf8') as file:
#     result=file.readlines()
#     print(result)
#
# #
# file = open('D:/Test.txt', 'r', encoding='utf-8')
# result = file.read(2)
# print(result)
# file.close()
#


# file = open('D:/Test.txt', 'r')
# result = file.readlines()
# print(result)
# file.close()

file = open('D:/Test.txt', 'r')
line = 1
for i in file:
    print(f'第{line}行：{i}', end = "")
    line += 1
file.close()


# file = open('D:/Test.txt', 'w')
# file.write("你好")
# file.close()
# file = open('D:/Test.txt', 'a')
# file.write("世界")
# file.close()
#
# file = open('D:/Test.txt', 'r')
# result = file.read(3)
# print(result)
# file.close()


# file = open('D:/Test.txt', 'w')
# file.write("hello")
# file.close()
# file.write("hello")


# file = open('D:/Test.txt', 'w')
# file.write("hello")
# file.close()
# file = open('D:/Test.txt', 'a')
# file.write("Hello")
# file.close()


# file = open('D:/Test.txt', 'w')
# file.write("hello")
# file.close()
# file = open('D:/Test.txt', 'w')
# file.write("Hello")
# file.close()

# file = open('D:/Test.txt', 'r')
# file.write("hello")
# file.close()


# file = open('D:/Test.txt', 'w')
# file.write("hello")
# file.close()


# file = open('D:/Test.txt', 'r')
# file.close()